mui.init();
var url = ""
var id_card = "";
mui.plusReady(function() {
	var Blur = function() {
		document.getElementById("pwd").blur();
		document.getElementById("rpwd").blur();
	}
	
	var self = plus.webview.currentWebview();
	id_card = self.id_card;
	url = self.url;
	
	console.log(url)
	console.log(id_card)
	
	
	document.querySelector(".img_show").querySelector("img").src = url;
	
	mui(".from").on("tap", "button", function(e) {
		Blur();
		console.log("aaaa")
		pwd = document.getElementById("pwd").value
		rpwd = document.getElementById("rpwd").value
		if(pwd.length ==0 || rpwd.length == 0){
			mui.toast("请正确输入");
			return;
		}
		
		if(pwd != rpwd){
			mui.toast("两次输入不一致");
			return;
		}
		
		require(["login"], function(login) {
			login.OnCnagePwd(id_card,pwd,function(data){
				mui.toast("修改成功")
				plus.webview.getWebviewById('login.html').evalJS("OnSetAuto(true);OnPlay(true);");
				OnOpenWindow("./login.html","login.html")
				OnDestroy(null)
				OnDestroy("getpwdby_photo.html")
				OnDestroy("getpwdby_phone.html")
			});
		});
	});
	
});
